package acm.同步赛4;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

public class D {


    /**
     *
     * @param n
     * @param k
     * @param target
     * @return
     */
    public static boolean fun(long n,long k,long target){
        if (target==0&&k==0){
            return true;
        }
        if (k<=0||target<=0||n<=0){   //钱用光了，但还剩选择，或选择用光了还剩钱。
            return false;
        }
        if (fun(n-1,k-1,target-n)){
            return true;
        }
        if (fun(n-1,k,target)){
            return true;
        }
        return false;
    }

    public static boolean dpFun(int n,int m,long target){
        Map<Node,Boolean> map=new HashMap<>();
        for (int i = 0; i < n; i++) {
            map.put(new Node(i,0,0),true);
        }
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= m; j++) {
                for (int k = 1; k <= target; k++) {
                    Node node = new Node(i, j, k);
                    boolean isOk=map.getOrDefault(new Node(i-1,j-1,k-i),false);
                    if (isOk){
                        map.put(node,isOk);
                        continue;
                    }
                    isOk=map.getOrDefault(new Node(i-1,j,k),false);
                    map.put(node,isOk);
                }
            }
        }
        Node node = new Node(n, m, target);
        return map.getOrDefault(node,false);
    }
    static class Node{
        int n;
        int k;
        long t;

        public Node(int n, int k, long t) {
            this.n = n;
            this.k = k;
            this.t = t;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Node node = (Node) o;
            return n == node.n && k == node.k && t == node.t;
        }

        @Override
        public int hashCode() {
            return Objects.hash(n, k, t);
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader in =new BufferedReader(new InputStreamReader(System.in));
        int n=Integer.parseInt(in.readLine());
//        long s=40000000000L;
        String[] read=null;
        while (n-- > 0) {
            read=in.readLine().split(" ");
//            boolean isOk = fun(Long.parseLong(read[0]),Long.parseLong(read[1]), Long.parseLong(read[2]));
            boolean isOk = dpFun(Integer.parseInt(read[0]),Integer.parseInt(read[1]), Long.parseLong(read[2]));
            System.out.println(isOk?"YES":"NO");
        }
    }
}
